package com.moi.summer;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;


public class HelloFragment extends Fragment {


    private TextView name;
/*
    private TextView download;
    private ImageView imageView;
    private ImageLoader.ImageListener listener;
    private ImageLoader imageLoader;
*/

    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        final View view = inflater.inflate(R.layout.hello, container, false);
        name = (TextView) view.findViewById(R.id.tv_name);
        name.setText(getActivity().getIntent().getStringExtra("text"));

 /*       RequestQueue mQueue = Volley.newRequestQueue(view.getContext());

        imageLoader = new ImageLoader(mQueue, new ImageLoader.ImageCache() {
            @Override
            public Bitmap getBitmap(String s) {
                return null;
            }

            @Override
            public void putBitmap(String s, Bitmap bitmap) {

            }
        });


        imageView = (ImageView) view.findViewById(R.id.iv_download);
        listener = ImageLoader.getImageListener(imageView, R.drawable.loading, R.drawable.error);
        download = (TextView) view.findViewById(R.id.tv_download);
        download.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                imageLoader.get("http://a2.qpic.cn/psb?/d236dc96-be3d-47aa-8e07-231533d6f9da/0GATmvpJgPhVwdmlNQz03oOknJur53XaDjtAI.3Pov0!/b/dAEAAAAAAAAA&bo=HAJLAgAAAAADAHI!&rf=viewer_4",
                        listener);

            }
        });*/
        return view;
    }




}
